package com.js.springbootmongodb.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(collection = "article")
public class Article {
    @Id
    private String articleid;
    @Indexed
    @Field(value = "title")
    private String title;
    @Indexed
    @Field(value = "content")
    private String content;
    @Indexed
    @Field(value = "createTime")
    private String createTime;
    @Indexed
    @Field(value = "status")
    private Integer status;

}
